package summer_vacation.cullen.two10;

import java.util.Scanner;

/**
 * Created by Cullen on 2015/8/11.
 */
public class N22 {
    public static void main(String[] args) {
        System.out.println("请输入一个三位数");
        Scanner a=new Scanner(System.in);
        int m=a.nextInt();
        if(m>999 || m<99){
            do {
                System.out.println("输入错误，请重新输入一个三位数：");
                m=a.nextInt();
            }while (m>999 || m<99);
        }
        int x=m/100;
        int y=m/10%10;
        int z=m%10;
        if(x*x*x+y*y*y+z*z*z==m){
            System.out.println(m+"是水仙花数！");
        }else System.out.println(m+"不是水仙花数！");

            }
        }
